using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using IDEInterfaceLibrary;

namespace NewRootProject
{
    public partial class ProgressDialog : Form
    {
        public ProgressDialog()
        {
            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            CreateROOTProject.AddFileProgress += new CreateROOTProject.AddFileProgressCallback(CreateROOTProject_AddFileProgress);
        }

        /// <summary>
        /// Bad stuff goign on -- we should update!
        /// </summary>
        /// <param name="dir_name"></param>
        /// <param name="depth"></param>
        /// <param name="number"></param>
        /// <param name="total_number"></param>
        void CreateROOTProject_AddFileProgress(string dir_name, int depth, int number, int total_number)
        {
            lbStatus.Text = dir_name;
            if (depth == 0)
            {
                pgProgress.Value = number;
                pgProgress.Maximum = total_number;
            }
        }

        private ROOTProject _project;

        public ROOTProject Project
        {
            get { return _project; }
            set { _project = value; }
        }

    }
}